import request from '@/utils/request'

// 获取借阅记录列表（分页）
export function getBorrowRecords(params) {
  return request({
    url: '/borrow-records',
    method: 'get',
    params
  })
}

// 获取我的借阅记录
export function getMyBorrowRecords(params) {
  return request({
    url: '/borrow-records/my',
    method: 'get',
    params
  })
}

// 归还书籍
export function returnBook(recordId) {
  return request({
    url: '/borrow-records/return',
    method: 'post',
    data: { recordId }
  })
}
